#include "displayresultswindow.h"
#include "ui_displayresultswindow.h"

DisplayResultsWindow::DisplayResultsWindow(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DisplayResultsWindow)
{
    ui->setupUi(this);
    tableWidget = ui->tableWidget;
}

DisplayResultsWindow::~DisplayResultsWindow()
{
    delete ui;
}

void DisplayResultsWindow::displayResults(const QList<QList<QString>>& results)
{
    tableWidget->setRowCount(results.size());
    for (int i = 0; i < results.size(); ++i) {
        for (int j = 0; j < results[i].size(); ++j) {
            tableWidget->setItem(i, j, new QTableWidgetItem(results[i][j]));
        }
    }
}
